Carbon


SoundComponentSetSource

Header: Sound.h Carbon status: Supported

Identifies your component’s source component.

ComponentResult SoundComponentSetSource (
    ComponentInstance ti, 
    SoundSource sourceID, 
    ComponentInstance source
);
Parameter descriptions
ti

A component instance that identifies your sound component.

sourceID

A source ID for the source component chain created by the Apple Mixer.

source

A component instance that identifies your source component.

function result

Returns noErr if successful or an appropriate result code otherwise.

DISCUSSION

Your SoundComponentSetSource function is called by the Sound Manager to identify to your sound component the sound component that is its source. The source component is identified by the source parameter. Your component uses that information when it needs to obtain more data from its source (usually, by calling its SoundComponentGetSourceData function).

Because a sound output device component is always connected directly to one or more instances of the Apple Mixer, the SoundComponentSetSource function needs to be implemented only by utility components (that is, components that perform modifications on sound data). Utility components are linked together into a chain of sound components, each link of which has only one input source. As a result, a utility component can usually ignore the sourceID parameter passed to it.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)